<template>
  <div id="nav">
	  <router-link to="/" class="nav-item">
		  <div class="icon-tab">
			<svg class="icon" aria-hidden="true">
			  <use xlink:href="#icon-shouye"></use>
			</svg>  
		  </div>
		  <div>
			  首页
		  </div>
	  </router-link>
	  <router-link to="/category" class="nav-item">
		  <div class="icon-tab">
		  	<svg class="icon" aria-hidden="true">
		  	  <use xlink:href="#icon-39"></use>
		  	</svg>		  
		  </div>
		  <div>
			  小游戏
		  </div>
	  </router-link>
	  <router-link to="/cart" class="nav-item">
		  <div class="icon-tab">
		  	<svg class="icon" aria-hidden="true">
		  	  <use xlink:href="#icon-gouwuche2"></use>
		  	</svg>		  
		  </div>
		  <div>
			  手游
		  </div>
	  </router-link>
	  <router-link to="/user" class="nav-item">
		  <div class="icon-tab">
		  	<svg class="icon" aria-hidden="true">
		  	  <use xlink:href="#icon-wode"></use>
		  	</svg>		  
		  </div>
		  
		  <div>
			  网游
		  </div>
	  </router-link>
	
    </div>
  <router-view/>
</template>



<style lang="scss">
#app {
  
}
#nav {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  line-height: 25px;
  text-align: center;
  background-color: #fafafa;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  box-shadow: 0 -2px 0 rgba($color: #eee, $alpha: 1.0);
  .nav-item{
	  flex: 1;
  }
  a {
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
  
  .icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    fill: currentColor;
    overflow: hidden;
  }
}
</style>
